package com.zhouhuo.serviceedu.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Mybatis 的配置类
 * @author zhouhuo
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.zhouhuo.serviceedu.mapper")
public class MybatisPlusConfig {

  /**
   * 添加逻辑删除插件
   * @return
   */
  @Bean
  public ISqlInjector sqlInjector() {
    return new LogicSqlInjector() ;
  }


}
